package com.changgou.pay.feign;

import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "pay")
@RequestMapping("/pay")
public interface WeiXinPayFeign {

    /***
     * 查询支付状态
     * @param out_trade_no
     * @return
     */
    @GetMapping(value = "/status/query")
    Result queryStatus(@RequestParam(name = "out_trade_no") String out_trade_no) throws Exception;

    /****
     * 关闭支付
     * @param orderId
     * @return
     * @throws Exception
     */
    @RequestMapping("/closePay")
    Result closePay(@RequestParam(name = "orderId") Long orderId) throws Exception;
}
